package com.genITeam.ria.dao;

import org.hibernate.Session;
import org.hibernate.criterion.Expression;
import com.genITeam.ria.vo.Member;

/**
 * @author 05030045
 *
 */
public class ChatRoomDAO {

	public Member getMember (int memberId, Session session){
		Member member = null ;

		try {					
			System.out.println("in ChatRoomDAO "  + memberId ); 

			member = (Member) session.createCriteria(Member.class).add(Expression.eq("id", new Integer(memberId))).uniqueResult() ;
		     
		} catch (Exception e) {
			System.out.println(e.getMessage()) ;

		}

		return member;
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
